const express = require('express');
const router = express.Router();
const Route = require("../../../controllers/sys_route.controller");

/**
 * @typedef RoutesModel
 * @property {number} parentId 父级ID
 * @property {string} menuType 菜单类型
 * @property {string} name 路由名称
 * @property {string} path 路由路径
 * @property {RoutesMetaModel.model} meta
 * @property {RoutesModel.model} children
 */

/**
 * @typedef RoutesMetaModel
 * @property {string} title 菜单名称
 * @property {number} rank 排序
 * @property {string} icon 图标
 */

/**
 * 获取用户路由
 * @route GET /api/private/routes
 * @group 系统基础
 * @security JWT
 * @returns {RoutesModel[]} 成功 返回列表
 * @returns {ResponseMeta.model} 错误异常
 */
router.get("/", Route.getRoutes);








module.exports = router;